@extends('project.common.framework') 
@section('content')
<div class="container-fluid">
    <h2>API概览</h2>
    <p>最近更新时间：{{ $project['update_time'] }}</p>

    @if(!empty($project['categorys']))
    @foreach( $project['categorys'] as $category )

    <h3>{{ $category['title'] }}</h3>

    <div class="row">
        <table class="table col-lg-12 col-md-12 col-xs-12">
            <thead>
                <tr>
                    <th style="width:35%">接口名称</th>
                    <th style="width:65%">接口功能</th>
                </tr>
            </thead>
            <tbody>
                @foreach( $category['apis'] as $api)
                <tr>
                    <td><a href="{{ route('project/api', ['project' => $project['id'], 'category' => $category['id'], 'api' => $api['id']]) }}">{{ $api['title'] }}</a></td>
                    <td>{{ $api['description'] }}</td>
                </tr>
                @endforeach
            </tbody>
        </table>
    </div>
    <br>

    @endforeach
    @endif
</div>
@endsection